Prizm Content Connect
How to Configure php Samples

Installation

  1. Install Prizm Content Connect for Linux and verify the service is working correctly. The installation will place the PHP sample in the following directory: /usr/share/prizm/Samples/PCCIS/php.
  2. Install Apache and PHP. Refer to the directions that are specific to your distribution.
  3. Add the following to the Apache configuration:

     
    Copy Code
    Alias /pccis_sample /usr/share/prizm/Samples/PCCIS/php
    <Directory /usr/share/prizm/Samples/PCCIS/php>
    AllowOverride All
    </Directory>
    
  4. On the command line, first check that the configuration file validates:

     
    Copy Code
    apache2ctl configtest
    
  5. Then restart the Apache service to read the configuration changes:

     
    Copy Code
    apache2ctl restart
    
  6. Update the following file to point to the directory location of the documents and markups that will be used in the viewer: /usr/share/prizm/Samples/php/pcc.config. In that file, the parameters to review are DocumentPath and MarkupsPath. The MarkupsPath will be written to by the web server process, so it must have appropriate permissions.
  7. Test the sample application in a browser:

PHP Directory Structure

PHP Code Overview

File / Folder

Description

html5/js folder

Contains the required JavaScript files making up the HTML5 viewer application.

html5/img folder

Contains graphics for the HTML5 viewer.

html5/css folder

Contains web style sheets for the HTML5 viewer.

html5/index.php

The default web starting page in this sample. The HTML5 viewer’s code gets loaded by this page.

pcc.php

Contains the supporting functions for the RESTful communication between the viewer and web server. The client side viewer Javascript object will use this RESTful interface as described in PCC RESTful API. File is required for functionality in a PHP enabled web server environment. While the code for the functions can be modified as needed, API modifications need careful care if changed. Most of the current web server RESTful interface passes the request onto Prizm Services. This keeps the application web tier fairly easy to understand and maintain.

pcc.config

Contains modifiable parameters for document location, saved markup record location, and Prizm Services connection settings.

.htaccess

Contains Apache web server settings.

Sample.doc

The test document used to illustrate the functionality of the HTML5 viewer.

overwriteOverlayTemplate.html

The template file that defines the view of the dialog that warns when an annotation record is being saved to an existing record name. More details are available in the "Templates" sub-section of the Design Basics topic.

printOverlayTemplate.html

The template file that defines the view of the dialog that provides print functionality. More details are available in the "Templates" sub-section of the Design Basics topic.

unsavedChangesOverlayTemplate.html

The template file that defines the view of the dialog that warns when an action may result in lost annotation changes. More details are available in the "Templates" sub-section of the Design Basics topic.

viewerTemplate.html

The template file that defines the user interface of the HTML5 viewer application. More details are available in the "Templates" sub-section of the Design Basics topic.

contextMenuTemplate.html

The template file that defines the user interface of the annotation context menus. More details are available in the "Templates" sub-section of the Design Basics topic.

imagingServiceProxy.php

This class provides a common set of methods for communicating with the PCC Imaging Service.

pccConfig.php

This class parses the pcc.config file and provides methods for easily reading its parameters.

predefinedSearch.json

This data file contains JSON formatted information defining search queries that will appear as selectable items in the viewer. The idea is to make available common search queries in order to speed work flow while reducing errors.

utils.php

A class containing helpful methods used frequently throughout the application.

language.json

Contains the informational text messages that appear in the viewer’s UI. This file can be edited so that different messages and/or different languages appear in the viewer.

This file is required for the Viewer to function.

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback